@model Three.BookStore.RBAC.DTOs.MenuDto

<dd>
    <a href="@(string.IsNullOrEmpty(Model.Url) ? "javascript:;" : Model.Url)">
        @if (!string.IsNullOrEmpty(Model.Icon))
        {
            <i class="layui-icon @Model.Icon"></i>
        }
        @Model.Name
    </a>
    @if (Model.Children != null && Model.Children.Count > 0)
    {
        <dl class="layui-nav-child">
            @foreach (var childMenu in Model.Children)
            {
                @await Html.PartialAsync("_MenuItemPartial", childMenu)
            }
        </dl>
    }
</dd> 